package com.mall.service.homepage.controller;

import com.mall.autoconfig.interceptor.BaseContext;
import com.mall.feign.clients.TestClients;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author Pan Rundong
 * @Date 2023-03-11 10:33
 * @Desc ceshi
 */
@RestController
@RequestMapping("test2")
@Slf4j
public class TestController2 {
//    public static void main(String[] args) {
//        Integer a=1;
//        Integer b=2;
//        BeanUtils.copyProperties(a,b);
//        System.out.println(b);
//    }

    @GetMapping
    public String commodityTest() {
        log.info("收到Authority模块请求，解析中。。。");
        String currentId = BaseContext.getCurrentId();
        log.info("B模块获取了用户Id，userId = {}", currentId);
        return "Feign调用成功，已连接到Homepage模块";
    }
}
